/**
 * Copyright (c) 2002-2011 旭鸣信息
 * All rights reserved. 
 * File：IOrderDao.java
 * History:
 *       May 11, 2012: Initially created, liuzhi.
 */
package com.xteam.ecsystem.dao;

import java.util.List;

import com.xteam.ecsystem.entities.BaseOrderInfo;
import com.xteam.ecsystem.utils.OrdersQueryCenterStation;

/**
 * 订单信息数据访问接口
 */
@SuppressWarnings("unchecked")
public interface IOrderDao {
	
	/**
	 * 
	 * 查询并分页显示订单信息【查询所有用户的订单信息】
	 * @author liuzhi
	 * @param direction
	 * @param orderStation
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public String getAllOrderList(String direction, OrdersQueryCenterStation orderStation, 
			int pageIndex, int pageSize);
	
	/**
	 * 
	 * 查询并分页显示订单信息【查询注册用户的订单信息】
	 * @author liuzhi
	 * @param direction
	 * @param orderStation
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 */
	public String getOrderList(String direction, OrdersQueryCenterStation orderStation, 
			int pageIndex, int pageSize);
	
	/**
	 * 根据区域编号获得区域信息
	 * @author liuzhi
	 * @param regionId
	 * @return
	 */
	public String getRegionInfo(String regionId);
	
	/**
	 * 
	 * 根据订单id获得订单信息
	 * @author liuzhi
	 * @param id
	 * @return
	 */
	public String getOrderInfoById(String id);
	
	/**
	 * 
	 * 根据会员id获得会员信息
	 * @author liuzhi
	 * @param id
	 * @return
	 */
	public String getMemberInfoById(String id);
	
	/**
	 * 根据订单编号加载商品订购列表
	 * @author liuzhi
	 * @param id
	 * @return
	 */
	public String getOrderGoodsById(String id);
	
	/**
	 * 根据订单编号和操作类型处理订单状态（订单处理流程，未涉及线上交易。若涉及线上交易，则需修改此流程）
	 * @author liuzhi
	 * @param id
	 * @param disposeType
	 * @param boiCreason
	 * @param boiIsrefund
	 * @param boiRefundremark
	 * @param boiInvnum
	 * @return 返回订单信息实体
	 */
	public BaseOrderInfo saveDisposedOrder(String id, String disposeType, String boiCreason,
			String boiIsrefund, String boiRefundremark, String boiInvnum);
	
	/**
	 * 批量确认订单信息
	 * @author liuzhi
	 * @param ids
	 */
	public void saveQueRenOrder(String ids);
	
	/**
	 * 批量取消订单信息
	 * @author liuzhi
	 * @param ids
	 * @param boiCreason
	 * @param boiIsrefund
	 * @param boiRefundremark
	 */
	public void saveQuXiaoOrder(String ids, String boiCreason, String boiIsrefund, 
			String boiRefundremark);

	/**
	 * 批量删除订单及其相关信息
	 * @author liuzhi
	 * @param ids
	 */
	public void delOrdersByIds(String ids);
	
	/**
	 * 根据区域编号或父级区域编号获得区域列表
	 * @author liuzhi
	 * @param bdrParent
	 * @return
	 */
	public String getRegionInfoList(String bdrId, String bdrParent);
	
	/**
	 * 更新收货人信息
	 * @author liuzhi
	 * @param order
	 * @return
	 */
	public int updateConsigneeInfo(BaseOrderInfo order);
	
	public String findOrderList(int pageIndex, int pageSize,
			String boiConsignee, String shopname, String boiMember,
			String boiMobile, String boiOrder, String boiOtimes,
			String boiOtimee,String boiShip);

	public String findOrderProductList(int pageIndex, int pageSize,
			String orderid);

	public void updateOrderState(String boiId, String currentState,
			String optionChange);

	public List findExportOrder(String boiConsignee, String shopname,
			String boiMember, String boiMobile, String boiOrder,
			String boiOtimes, String boiOtimee,String boiShip);
	
	public List getOrderList(String orderlist,List listin);

	public String getGoodsCombobox(String value);

	public String showGoodsInfoById(String bgiId);

	public String showGoodsAttrById(String bgiId);

	public int saveOrderGoods(String jsonStr,String boiGpay,String boiId);
	
}
